<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#example').dataTable( {
			"sScrollY": "800px",
			"bPaginate": false,
			"bScrollCollapse": true
		} );
	});
</script>

<script type="text/javascript">
	

	$(document).ready(function() {
		
		$(".view").fancybox();

	});
	
	
	function CA(){
		var cIdx = 'VAR_AKUN';
		//alert(counterIdx);
		var cControl = 'control';		
		for (var i=0;i < document.jurnal_umum.elements.length;i++)
		{
			var e = document.jurnal_umum.elements[i];
			if ((e.id == cIdx) && (e.id != cControl) && (e.type=='checkbox'))
			{
				e.checked = document.getElementById(cControl).checked;
			
			}
		}
	}
	
	 function confirmposting()
	{
		var answer = confirm("Yakin Posting ? ")
		if (answer){
			document.jurnal_umum.submit();
		}
		
		return false;  
	}  
	
</script>
<div id="page-heading"><h1>Jurnal Umum Unposting</h1></div>

		<?php
			$attributes = array('name' => 'jurnal_umum', 'id' => 'jurnal_umum', 'class'=>'block-content form', 'type'=>'post');
			echo form_open('jurnal_umum/posting/', $attributes);
		?>
<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
	<tr>
		<th rowspan="3" class="sized"><img src="<?php echo base_url();?>asset/admin/images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
		<th class="topleft"></th>
		<td id="tbl-border-top">&nbsp;</td>
		<th class="topright"></th>
		<th rowspan="3" class="sized"><img src="<?php echo base_url();?>asset/admin/images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
	</tr>
	<tr>
		<td id="tbl-border-left"></td>
		<td>
		<!--  start content-table-inner -->
		<div id="content-table-inner">
		<div id="table-content">
			<table border="0" width="100%" cellpadding="0" cellspacing="0">
				<tr valign="top">
				<td>
								
					<!--  start step-holder -->
					<div id="step-holder">
						<div class="step-no">1</div>
						<div class="step-light-left"><?php if ($can_view == TRUE){
							echo anchor('jurnal_umum/index', 'List Jurnal Umum');
						}?></div>
						<div class="step-light-right">&nbsp;</div>
						<div class="step-no-off">2</div>
						<div class="step-light-left"><?php if ($can_insert == TRUE){
							echo anchor('jurnal_umum/insert', 'Tambah Data');
						}?></div>
						<div class="step-light-right">&nbsp;</div>
						<div class="step-no-off">3</div>
						<div class="step-dark-left"><?php if ($can_insert == TRUE){
							echo anchor('jurnal_umum/list_posting', 'Posting Jurnal Umum');
						}?></div>
						<div class="step-dark-round">&nbsp;</div>
											
						<div class="clear"></div>
					</div>
					<!--  end step-holder -->
				
					<!-- start id-form -->

						<table border="0" width="100%" cellpadding="0" cellspacing="0" class="display" id="example">
						<thead>
							<tr>
								<th class="table-header-repeat line-left minwidth-1"><input type="checkbox" id="control" onclick="CA(0)"/></th>
								<th class="table-header-repeat line-left minwidth-1"><a href="">Glid</a></th>			
								<th class="table-header-repeat line-left minwidth-1"><a href="">Tanggal</a></th>			
								<th class="table-header-repeat line-left minwidth-1"><a href="">Jumlah</a></th>			
								<th class="table-header-repeat line-left minwidth-1"><a href="">Ket Transaksi</a></th>			
								<th class="table-header-repeat line-left minwidth-1"><a href="">Aksi</a></th>			
							</tr>
						</thead>
						<tbody>
						<?php
							$i=1;
							$j=0;
							foreach($results->result() as $row) { ?>
							<tr class="alternate-row">
								<td align="left" valign="top">
									<?php
											echo "<input type='checkbox' id='VAR_AKUN' name='glid[]' value='$row->glid'/>";
									?>
								</td>
								<td align="left" valign="top"><?=$row->glid?> </td>
								<td align="left" valign="top"><?=convert_date_mysql_indo($row->tanggal);?> </td>
								<td align="left" valign="top"><?=$row->jumlah?> </td>
								<td align="left" valign="top"><?=$row->ket_transaksi?> </td>
								<td align="left" valign="top">
									<?=anchor('jurnal_umum/detail_jurnal_umum/'.$row->glid, '[detail]', array('class'=>'with-tip view','id'=>'view'))?>
								</td>
							</tr>
							<?php $i++; $j++; } ?>
							
						</tbody>		
						</table>

					<!-- end id-form  -->

				</td>
		
				</tr>
			</table>
		
		
				<!--  start paging..................................................... -->
			<table border="0" cellpadding="0" cellspacing="0" id="paging-table">
			<tr>
				<td>
					<?php echo $this->pagination->create_links(); ?>
				</td>
				<td> 				
				</td>
			</tr>
			<tr>
								<td valign="top" colspan="2">
									<input type="button" onclick="confirmposting();" value="Posting" class="form-submit" />
									<input type="reset" value="Batal" class="form-reset"  />
								</td>
							</tr>	
			</table>
			
			</div>
		<!--  end paging................ -->
		
		<div class="clear"></div>

		</div>
		<!--  end content-table-inner  -->
		</td>
		<td id="tbl-border-right"></td>
	</tr>
	<tr>
		<th class="sized bottomleft"></th>
		<td id="tbl-border-bottom">&nbsp;</td>
		<th class="sized bottomright"></th>
	</tr>
</table>
</form>